home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ Network LegalNotice.xpl < prev    next >
Text File  |  1999-06-13  |  2KB  |  82 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="2"
  4. "UIPATH"="Network\Login\Login Window"
  5. "NAME"="Legal Notice"
  6. "VERSION"="1.51"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Message Title"
  9. "TEXT 2"="Message Text"
  10. "DESCRIPTION 1"="You can configure a message that is displayed before a user is able to logon to this machine."
  11. "DESCRIPTION 2"="This message is normally used for legal notices or something similar."
  12. "DESCRIPTION 3"="Note that both fields have to contain a value, otherwise the message will not be displayed!"
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  16. "COMMENT 2"="(Windows 95 Support by StaSys)"
  17.  
  18.  
  19. sP=""
  20. bOK=false
  21. v1="LegalNoticeCaption"
  22. v2="LegalNoticeText"
  23.  
  24. Sub Plugin_Initialize 
  25.  sP="HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\"
  26.  if RegPathExists(sp) then
  27.   'Windows NT
  28.   bOK=true
  29.  else
  30.   'Windows 95?
  31.   sP="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WinLogon\"
  32.   if RegPathExists(sp) then
  33.    bOK=true
  34.   else
  35.    bOK=false
  36.   end if
  37.  end if
  38.  
  39.  if bOK=true then
  40.   s=RegReadValue(sp&v1)
  41.   Call SetUIElement(1,s)
  42.  
  43.   s=RegReadValue(sp&v2)
  44.   Call SetUIElement(2,s)
  45.  else
  46.   Disable
  47.  end if
  48. End Sub
  49.  
  50. Sub Plugin_CheckData(ElementIndex)
  51. End Sub
  52.  
  53. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  54.  s1=GetUIElement(1)
  55.  s2=GetUIElement(2)
  56.  
  57.  if Len(s1)>0 and Len(s2)>0 then
  58.   Call RegWriteValue(sp&v1,s1,1)
  59.   Call RegWriteValue(sp&v2,s2,1)
  60.   Call Restart
  61.  else
  62.   if Len(s1)=0 and Len(s2)=0 then
  63.    s=RegReadValue(sp&v1)
  64.    if IsEmpty(s)=false then Call RegDeleteValue(sp&v1)
  65.  
  66.    s=RegReadValue(sp&v2)
  67.    if IsEmpty(s)=false then Call RegDeleteValue(sp&v2) 
  68.    
  69.    Call Logoff
  70.   else
  71.    Call MsgError("Please enter a text in both fields, otherwise the message will not be displayed.")
  72.   end if
  73.  end if
  74.  
  75. End Sub
  76.  
  77. Sub Plugin_Terminate 
  78. End Sub
  79.  
  80.  
  81.  
  82.